package _999ZuHeShiTi;

/**
 * @Client: 组合实体的客户端类
 * @author: ZBoHang
 * @time: 2021/9/18 10:19
 */
public class Client {
    private CompositeEntity compositeEntity = new CompositeEntity();

    public void printData() {
        String[] data = compositeEntity.getData();
        for (int i = 0, len = data.length; i < len; i++) {
            System.out.println("Data: " + data[i]);
        }
    }

    public void setData(String data1, String data2) {
        compositeEntity.setData(data1, data2);
    }
}
